<template>
	<view class="login-wechat">
		<bi-wx-login 
			:allow-submit="allowSubmit"
			@before-submit="handleBeforeSubmit"
			@success="handleWechatLoginSuccess"
      :invite-user-id="inviteUserId"
		></bi-wx-login>
	</view>
</template>

<script>
import BiWxLogin from '@/common/wx-login/wx-login.vue'

export default {
	name: 'LoginWechat',
	components: {
		BiWxLogin
	},
	props: {
		allowSubmit: {
			type: Boolean,
			default: true
		},
    inviteUserId:{
      type: String,
      default: ''
    }
	},
	methods: {
		handleBeforeSubmit (evt) {
			this.$emit('before-submit', evt)
		},
		handleWechatLoginSuccess (evt) {
			this.$emit('success', evt)
		}
	}
}
</script>

<style lang="less">
.login-wechat{
	padding: 24px 24px 0;
}
</style>